import React from 'react';
import { Button, Empty } from 'antd';
const NotFound = () => {
  const handleBack = () => {
    if (window.history.length > 1) {
      window.history.back();
    } else {
      alert('已经是第一页了，不能继续后退');
    }
  };
  return (
    <Empty
      image="https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg"
      imageStyle={{ height: 360 }}
      description={<span>404 页面不存在</span>}
    >
      <Button onClick={handleBack} type="primary">
        返回
      </Button>
    </Empty>
  );
};

export default NotFound;
